import 'package:flutter/cupertino.dart';

import '../lifrcyle/AppLifecycleObserver.dart';

abstract class BaseState<T> extends State with WidgetsBindingObserver {
  final AppLifecycleObserver _observer = AppLifecycleObserver();

  @override
  void initState() {
    // 注册观察者
    // WidgetsBinding.instance.addObserver(_observer);
    super.initState();
  }


  @override
  void dispose() {
    // 移除观察者
    // WidgetsBinding.instance.removeObserver(_observer);
    super.dispose();
  }
}
